<?php

	require_once("fta.201003310000/fta.php");
	
	fta_registerModules(
		array(
			"FTAORM/FTAORM"
		)
	);

	class _FTAORMCMSContentMetadata extends FTAORM {
		function __construct (Zend_Db_Adapter_Abstract $zdb){
			parent::__construct($zdb);			
			$this->primaryKey = "documentcode";
			$this->tableName = 'cmscontentmetadata';
			$this->tableFields = array(
				'documentcode',
				'uid',
				'gid',
				'rank',
				'label',
				'heading',
				'pagetitle',
				'listlabel',
				'urlfragment',
				'keywords',
				'description',
				'metatags',
				'dateadded' ,
				'datemodified' ,
				'lastedituser',
				'isactive',
				'template',
				'publishstartdate'  ,
				'publishenddate' ,
				'approvaldate' ,
				'approvedbyuser',
				'addedbyuser',
		//		'tags'
			);
			
			// add types here.. 
			$this->tableFieldTypes = array(
				'documentcode' => 'foreignKey',
				'uid' => 'number',
				'gid' => 'number',
				'rank' => 'number',
				'label' => 'string',
				'heading' => 'string',
				'pagetitle' => 'string',
				'listlabel' => 'string',
				'urlfragment' => 'string',
				'keywords'  => 'string',
				'description'  => 'string',
				'metatags'  => 'string',
				'dateadded' => 'dateAsMySQLTimestamp',
				'datemodified' => 'dateAsMySQLTimestamp',
				'lastedituser' => 'number',
				'isactive' => 'number',
				'template' => 'number',
				'publishstartdate' => 'dateAsMySQLTimestamp',
				'publishenddate' => 'dateAsMySQLTimestamp',
				'approvaldate' => 'dateAsMySQLTimestamp',
				'approvedbyuser' => 'number',
				'addedbyuser' => 'number',
			//	'tags'=>'string'			
			);
			$this->tableRequiredFields = array(
				"addedbyuser"
			);			
		}
		
	}
